-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace receipt #26508
Replace receipt #26508
Conversation
This reverts commit 356f371.
Ok, I think the web issues are gone after merging main. Gonna look into the cross platform issue now |
I was able to test on iOS and I do see the image being updated on web. Android simulator is giving me a lot of headaches with the bad internet connection in Bali, so I'm not able to reliably test this condition. This PR is blocking others, so given that it's working on all platforms but android I think we should go ahead and merge this PR and then address the issue in a follow up if we encounter it on staging ios.web.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good! Just one question and I'll jump to testing
@@ -331,6 +338,10 @@ function AttachmentModal(props) { | |||
}} | |||
onModalHide={(e) => { | |||
props.onModalHide(e); | |||
if (onModalHideCallbackRef.current) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this do?
Tests well, but Android is also being a pain for me. I'm ok merging this |
I don't know what to do with this. For me it works very unpredictable and I'm not sure if I want to take responsibility for approving this... |
Another issue, this time on iOS: Screen.Recording.2023-09-19.at.08.37.37.mov |
@burczu could you clarify what you mean by:
Happy to help test here, if needed, @luacmartins. |
@MariaHCD I encountered some issues (you can see my comments in the thread above), that I don't see resolved. If you like to test it, go on - maybe it's the matter of my environment. Right now I'm struggling with Android build so I can't get back to this PR at the moment. |
@luacmartins I've cleaned my environment and re-tested everything with new user. Web is now working as expeced, as well as on Android. The only issue I have is with iOS - please see this comment. It sometimes work but in most cases it throws an error of "Unhandled Promise Rejection". |
That error points to this fetch call failing with a |
@MariaHCD I'd love another review here so we can get this merged asap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I was able to successfully replace the image on iOS so I think I can approve it... I'm not sure how improving error handling will fix the issue with rejecting this Promise, because I guess the question is why it is rejected not how it is handled...
Yea, that makes sense. I'll investigate that as part of the other issue! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.72-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.72-11 🚀
|
icon: Expensicons.Camera, | ||
text: props.translate('common.replace'), | ||
onSelected: () => { | ||
onModalHideCallbackRef.current = () => Navigation.navigate(ROUTES.getEditRequestRoute(props.report.reportID, CONST.EDIT_REQUEST_FIELD.RECEIPT)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This caused #27903 when navigating to the replace receipt screen not from within a tab navigator, i.e. whenever clicking from the three dots menu.
<HeaderWithBackButton | ||
title={translate('common.receipt')} | ||
onBackButtonPress={Navigation.goBack} | ||
/> | ||
<DragAndDropProvider> | ||
<ReceiptSelector | ||
route={route} | ||
transactionID={transactionID} | ||
/> | ||
</DragAndDropProvider> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes an inconsistency issue here where the Green drag and drop area does not show in full-screen #28014
Details
Adds the ability to replace transaction receipts
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/295248
Tests
Scan
optionOffline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
I'm having issues building iOS and android native at the moment. I'll try to upload the videos later.
Web
web.mov
Mobile Web - Chrome
chrome.mov
Mobile Web - Safari
safari.mov
Desktop
desktop.mov
iOS
ios.mov
Android
android.mov